#ifndef __TABLE_LAYOUT_H__
#define __TABLE_LAYOUT_H__

#include "gofgame/common/ui/Layout.h"
#include "gofgame/common/ui/TableColumn.h"
#include "gofgame/common/cxx_0x.h"
#include <vector>
using namespace gofgame::common::ui;
using namespace std;

namespace gofgame {
	namespace common {
		namespace ui {
			class TableLayout : public Layout {
			public:
				TableLayout(float minRowHeight = 20);

				float getMinRowHeight() const;
				void setMinRowHeight(float minRowHeight);

				float getCellSpacing() const;
				void setCellSpacing(float cellSpacing);

				float getCellPadding() const;
				void setCellPadding(float cellPadding);

				void clearColumns();
				void addColumn(const TableColumn &column);

			protected:
				virtual void onLayout() _override;

			private:
				float minRowHeight;
				float cellSpacing;
				float cellPadding;
				vector<TableColumn> columns;
			};
		}
	}
}

#endif //__TABLE_LAYOUT_H__
